<!--查看图片-->
<div id="img-modal" class="modal fade modal_small" role="dialog" aria-labelledby="myModalLabel1" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                <h4 class="modal-title">评论图片</h4>
            </div>
            <form action="" class="form-horizontal" id="save-category-form" method="post">
                <div class="row">
                    <div class="col-md-12 img-box">
                    </div>
                </div>
                <div class="modal-footer">
                    <input type="hidden" name="id" value=""/>
                    <button class="btn default" data-dismiss="modal" aria-hidden="true"><i class="fa fa-times"></i> 关闭</button>
                    <script>
                        $(function(){
                            var model = $('#img-modal');
                            $('.img-btn').live('click', function(){
                                model.find('.has-error').removeClass('has-error').find('.validate_message').remove();
                                model.find('.show_message_error').remove();
                                var id = $(this).attr('data-id');
                                l_blockUI({});
                                $.ajax('<?php echo getUrl('product/comment/getInfo');?>', {
                                    dataType:'json',
                                    type:'post',
                                    data:{id:id},
                                    error:function(){
                                        show_message({status:0, message:'请求超时'});
                                        App.unblockUI();
                                    },
                                    timeout:60000,
                                    success:function(data,textStatus,jqXHR){
                                        if (data.status == 0){
                                            show_message(data);
                                            App.unblockUI();
                                            return false;
                                        }
                                        var img = '';;
                                        if (data.data.imgs == null){
                                            img ='<div id="body-container">'+
                                                '<div class="warps-textCons">'+
                                                '<h1>暂无评论图片</h1>'+
                                                '</div>'+
                                                '</div>';
                                        }else {
                                            $.each(data.data.imgs, function (key, obj) {
                                                img += '<div class="col-md-4 img"><a href="' + obj + '"  target="_blank"><img src="' + obj + '" alt=""></a></div>';
                                            });
                                        }
                                        model.find('.img-box').html(img);
                                        model.modal();
                                        App.unblockUI();
                                    }
                                },'json');

                                return false;
                            });
                        })
                    </script>
                </div>
            </form>
        </div>
    </div>
</div>